package com.example.myapplication;

import android.renderscript.ScriptGroup;
import android.text.InputType;
import android.view.View;
import android.widget.Button;
import android.widget.Switch;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    private Button mybtn ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout02);
        mybtn = (Button) findViewById(R.id.button3) ;
        int input = mybtn.getInputType() ;
        mybtn.setOnClickListener(new Mybtn(input));
    }

    private class Mybtn implements View.OnClickListener{

        private int inputtype  ;

        Mybtn(int a){
            inputtype = a ;
        }

        @Override
        public void onClick(View v) {
            mybtn.setText("joker");
        }
    }
}